export default {
  name: 'KTableBody',
  props: {
    columns: {
      type: Array,
      default: [],
    }
    ,
    data: {
      type: Array,
      default: [],
    },
  },
  render(h) {
    return (
      <tbody>
        {/* this._l类似于v-for遍历,vue内置 */}
        {this._l(this.data, (row, rindex) => {
          return (
            <tr>
              {this._l(this.columns, (column, cindex) => {
                return <td>{column.renderCell(h, {row, rindex})}</td>
              })}
            </tr>
          )
        })}
      </tbody>
    )
  }
  ,
}
